Foxit PDF SDK
FoxitPDFSDKPython2.PDF2Md Class Reference

Inherits FoxitPDFSDKPython2._object.

Static Public Member Functions

def ConvertToMarkdown (src_pdf_file_path, src_file_password, saved_md_path, saved_image_dir_name, setting_data)
 Convert a PDF format file to a Markdown file. More...
 
def GetVersion ()
 Get the version of Foxit PDF Conversion SDK. More...
 
def Initialize (library_path)
 Initialize the PDF2Md module by loading the Foxit PDF Conversion SDK library. More...
 
def Release ()
 Release the PDF2Md module and unload the Foxit PDF Conversion SDK library. More...
 

Detailed Description

This class can be used to convert PDF format files to Markdown files.

Note
Before using this class, please call FoxitPDFSDKPython2.PDF2Md.Initialize to load the Foxit PDF Conversion SDK library. After all conversions are done, call FoxitPDFSDKPython2.PDF2Md.Release to unload the library.

Member Function Documentation

◆ ConvertToMarkdown()

FoxitPDFSDKPython2.PDF2Md.ConvertToMarkdown (   src_pdf_file_path,
  src_file_password,
  saved_md_path,
  saved_image_dir_name,
  setting_data 
)
static

Convert a PDF format file to a Markdown file.

Function FoxitPDFSDKPython2.PDF2Md.Initialize must be called successfully before calling this function.

Parameters
[in]src_pdf_file_pathPath of a PDF format file. This should not be an empty string.
[in]src_file_passwordPassword for the input file. Pass an empty string if no password.
[in]saved_md_pathPath of the saved Markdown file as conversion result. This should not be an empty string.
[in]saved_image_dir_nameName of the directory to save extracted images, placed next to the output Markdown file. Must be a plain folder name without path separators (e.g. "my_images"). If null or empty, images will be saved to a default directory named <md_basename>_images next to the output Markdown file.
[in]setting_dataA PDF2MdSettingData object which is used for converting. Default value: PDF2MdSettingData default values.
Returns
true means success, while false means failure.

◆ GetVersion()

FoxitPDFSDKPython2.PDF2Md.GetVersion ( )
static

Get the version of Foxit PDF Conversion SDK.

This function should be called after the function FoxitPDFSDKPython2.PDF2Md.Initialize has been called successfully.

Returns
A string which contains the version information of Foxit PDF Conversion SDK.

◆ Initialize()

FoxitPDFSDKPython2.PDF2Md.Initialize (   library_path)
static

Initialize the PDF2Md module by loading the Foxit PDF Conversion SDK library.

Before using FoxitPDFSDKPython2.PDF2Md.ConvertToMarkdown , please call this function first with the path to the Foxit PDF Conversion SDK library. Function FoxitPDFSDKPython2.Library.Initialize must already have been called successfully with a key including "PDF2Md" module right.

Parameters
[in]library_pathPath to the Foxit PDF Conversion SDK dynamic library (e.g. "fpdfconversionsdk_win64.dll" on Windows, "libfpdfconversionsdk.so" on Linux). This should not be an empty string.
Returns
None.

◆ Release()

FoxitPDFSDKPython2.PDF2Md.Release ( )
static

Release the PDF2Md module and unload the Foxit PDF Conversion SDK library.

This function should be called after all FoxitPDFSDKPython2.PDF2Md.ConvertToMarkdown calls are finished. It must be called after FoxitPDFSDKPython2.PDF2Md.Initialize has been called successfully.

Returns
None.